import { PureComponent } from 'react'
import Errors from '../../components/Errors';

const errors = null


class ArticleNew extends PureComponent {
    render() {
        let {errors,tags} = this.props
        tags = ["html","css","js"]
        return (  
            <div className='editor-page'>
                <div className='container page'>
                    <div className='row'>
                        <div className='col-md-10 offset-md-1 col-xs-12'>
                            <h1>创建文章</h1>
                            {/* 错误提示 */}
                            <Errors errors={errors} />

                            <form>
                                <fieldset>
                                    <fieldset className='form-group'>
                                        <input
                                            className='form-control'
                                            type='text'
                                            placeholder='文章标题'
                                        />
                                    </fieldset>
                                    <fieldset className='form-group'>
                                        <input
                                            className='form-control'
                                            type='text'
                                            placeholder='文章描述'
                                        />
                                    </fieldset>
                                    <fieldset className='form-group'>
                                        <textarea
                                            className='form-control'
                                            rows='12'
                                            placeholder='使用markdow编写文章'
                                        />
                                    </fieldset>
                                    <fieldset className='form-group'>
                                        <input
                                            className='form-control'
                                            type='text'
                                            placeholder='输入标签'
                                        />
                                    </fieldset>
                                    <button className='btn btn-primary pull-xs-right' type='submit'>
                                        发布文章
                                    </button>
                                    <br/>
                                    <div className='tag-list'>
                                        {
                                            (tags||[]).map(tag=>{
                                                return(
                                                    <span className='tag-gt1'>
                                                        {tag}
                                                    </span>
                                                )
                                            })
                                        }
                                    </div>
                                </fieldset>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        )

    }
}

export default ArticleNew;
